﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FakeXiecheng.API.Moldes;
using FakeXiecheng.API.Helper;
namespace FakeXiecheng.API.Services
{
    public interface ITouristRouteRepository
    {
        //Task<IEnumerable<TouristRoute>> GetTouristRoutesAsync(string keyword, string ratingOperator, int? ratingValue,
        //    int pageSize,int pageNumber
        //    );
        Task<PaginationList<TouristRoute>> GetTouristRoutesAsync(string keyword, string ratingOperator, int? ratingValue,
            int pageSize, int pageNumber,string orderBy
            );
        //一组的旅游路线
        //IEnumerable<TouristRoute> GetTouristRoutes();
        //单独的旅游路线
        Task<TouristRoute> GetToruistRouteAsync(Guid touristRouteId);
        Task<bool> TouristRouteExistsAsync(Guid touristRouteId);
        Task<IEnumerable<TouristRoutePicture>> GetPicturesByTouristRouteIdAsync(Guid touristRouteId);
        Task<TouristRoutePicture> GetPictureAsync(int pictureId);
        //批量返回一组数据
        Task<IEnumerable<TouristRoute>> GetTouristRoutesByIDListAsync(IEnumerable<Guid> ids);
        void AddTouristRoute(TouristRoute touristRoute);
        void AddTouristRoutePicture(Guid touristRouteId, TouristRoutePicture touristRoutePicture);
        void DeleteTouristRoute(TouristRoute touristRoute);
        //批量删除数据
        void DeleteTouristRoutes(IEnumerable<TouristRoute> touristRoutes);
        void DeleteTouristRoutePicture(TouristRoutePicture picture);
        //购物车接口
        Task<ShoppingCart> GetShoppingCartByUserId(string userId);
        //创建购物车
        Task CreateShoppingCart(ShoppingCart shoppingCart);
        //添加购物车
        Task AddShoppingCartItem(LineItem lineItem);
        //删除购物车
        Task<LineItem> GetShoppingCartItemByItemId(int lineItemId);
        void DeleteShoppingCartItem(LineItem lineItem);
        //批量删除
        Task<IEnumerable<LineItem>> GeshoppingCartsByIdListAsync(IEnumerable<int> ids);
        void DeleteShoppingCartItems(IEnumerable<LineItem> lineItems);
        //创建订单
        Task AddOrderAsync(Order order);
        //Task<IEnumerable<Order>> GetOrdersByUserId(string userId,int pageSize,int pageNumber);
        Task<PaginationList<Order>> GetOrdersByUserId(string userId, int pageSize, int pageNumber);

        Task<Order> GetOrderById(Guid orderId);
        Task<bool> SaveAsync();
        
    }
}
